<!DOCTYPE html>
<html lang="en">
<head>
{% block head %}{% endblock %}
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/min.css' %}">
<script src="{% static 'js/min.js' %}"></script>
<link rel="stylesheet" href="{% static 'css/1.base.css' %}">
<style>
  #editor—wrapper {
    border: 1px solid #ccc;
    z-index: 100; /* 按需定义 */
  }
  #toolbar-container { border-bottom: 1px solid #ccc; }
  #editor-container { height: 500px; }
</style>
<body>
<header class="p-3 text-bg-light border-bottom mb-3">
    <div class="container">
      <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
        <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
        <img src="{% static 'img/moban.png' %} " height="40px">
        </a>

        <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
          <li><a href="/" class="nav-link px-2 text-secondary"><h2>首页</h2></a></li>
          <li><a href="{% url 'blog:pub_blog' %}" class="nav-link px-2 text-secondary"><h2>发布博客</h2></a></li>
</ul>
        <form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3 " role="search" action="{% url 'blog:search'%}">
          <input type="search" name="q" class="form-control " placeholder="搜索..." aria-label="Search">
        </form>
        {% if user.is_authenticated %}
<div class="dropdown text-end">
         <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    {% if user.image %}
        <img src="{{ user.image.url }}" alt="用户头像" width="32" height="32" class="rounded-circle">
    {% else %}
        <img src="{% static 'img/moban.png' %}" alt="默认头像" width="32" height="32" class="rounded-circle">
    {% endif %}
</a>
          <ul class="dropdown-menu text-small" style="">
              <li><a class="dropdown-item" href="{% url 'auth0:user_profile' %}">个人中心</a></li>
            <li><a class="dropdown-item" href="{% url 'auth0:logout0' %}">退出登录</a></li>
          </ul>
        </div>
            {% else %}
                    <div class="text-end">
          <a href="{% url 'auth0:login' %}" type="button" class="btn btn-outline-primary me-2">登录</a>
          <a href="{% url 'auth0:register' %}" type="button" class="btn btn-primary">注册</a>
        </div>
          {% endif %}


      </div>
    </div>
  </header>
<main class="container bg-white p-3 rounded">
{% block mate %}{% endblock %}
</main>
</body>
</html>